/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef __LIB3D_PARTICLEKEYFRAME_H__
#define __LIB3D_PARTICLEKEYFRAME_H__

#include <map>
#include <vector>
#include <Atom.h>

namespace liba
{
	namespace lib3d
	{
		namespace particles
		{
			class ParticleEvent;
			
			struct KeyFrame
			{
				Float           time;
				ParticleEvent * event;
				
				template<typename EventType>
				inline EventType * get_event()
				{
					return static_cast<EventType*>(event);
				}
			};
			
			typedef std::vector<KeyFrame>         KeyFrameArray;
			typedef KeyFrameArray::iterator       KeyFrameIterator;
			typedef std::map<Atom, KeyFrameArray> KeyFrameMap;
		}
	}
}

#endif